package com.vst.serverdatalib.https;

import java.io.IOException;

import com.rt.BASE64Decoder;
import com.rt.BASE64Encoder;


public class BASE64Util {

    public static String decryptBASE64(String key) {
        try {
            return new String((new BASE64Decoder()).decodeBuffer(key), "utf-8");
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }
    
    public static String encryptBASE64(String key) {
        try {
            return new BASE64Encoder().encodeBuffer(key.getBytes());
        } catch (Exception e) {
            e.printStackTrace();
        }
        return key;
    }

}
